package com.mdt.doforms.bienen;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;

public class DashBoardActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dashboard);
	}
	
	public void onHomeBtnClicked(View oView){
		startActivity(HomeActivity.class);
	}
	
	public void onDrugStoreBtnClicked(View oView){
		startActivity(StammApothekeActivity.class);
	}
	
	public void onNotdienstBtnClicked(View oView){
		startActivity(NotdiensteActivity.class);
	}
	
	public void onKartenBtnClicked(View oView){
		startActivity(KartenActivity.class);
	}
	
	private void startActivity( Class<?> cls){
		Intent intent = new Intent(getApplicationContext(), cls);
	    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
	    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
	    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){
	        intent.addFlags(0x8000); // equal to Intent.FLAG_ACTIVITY_CLEAR_TASK which is only available from API level 11
	    }
	    startActivity(intent);
		
	}
}
